﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KiDS_Projekat
{
	public class Master
	{
		private string _address;
		private ushort _port;
		private string _location;

		public Master(string address, ushort port, string location)
		{
			if (address == "127.0.0.1" || address == "0.0.0.0")
				_address = Properties.Settings.Default.DefaultLokacija;
			else _address = address;
			_port = port;
			_location = location;
		}

		public ushort Port
		{
			get
			{
				return _port;
			}
		}

		public string Location
		{
			get
			{
				return _location;
			}
		}

		public string Address
		{
			get
			{
				return _address;
			}
			set
			{
				_address = value;
			}
		}

		public override string ToString()
		{
			return _location + "," + _port + "," + _address;
		}
	}
}
